/*
 * @Author: 姚贤通 10254465+yao-xiantong@user.noreply.gitee.com
 * @Date: 2022-11-20 10:30:00
 * @LastEditors: 姚贤通 10254465+yao-xiantong@user.noreply.gitee.com
 * @LastEditTime: 2022-11-22 12:32:43
 * @FilePath: \vue\src\api\paper.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import http from '../utils/request.js'

//向外暴露这个整个paper表的api
export default {

    getAllHomeWorkPapersByClassId(params) {

        return http.get("/paper/getAllHomeWorkPapersByClassId?classId=" + params);
    },
    getAllExamPapersByClassId(params) {

        return http.get("/paper/getAllExamPapersByClassId?classId=" + params);
    },

    addNewPaper(params){
        let url = "/paper/addNewPaper"
        return http.post(url,params)
    },





    //通过教师id查找他的课程下的所有班级
    getqueryClassAndCourseByTeacherID(params){
        return http.get("/paper/qurycourseNameAndClassByTeacherId?teacherId=" + params);
    },

    //添加班级考试
    batchAddClassPaper(params){
        return http.post("/paper/addClassPaper",params)
    },

    getAllHomeWorkAndExamByTeacherId(teacherId){

        return http.post('paper/getAllHomeWorkAndExamByTeacherId',{
            teacherId:teacherId,
        },{
            headers: { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' }
        })
    },
    deleteById(params){
        return http.get("paper/deleteById?id="+params);
    },
    deleteAll(params){
        return http.get("paper/deleteAll?id="+params);
    }


}